﻿using EntityModels.E09.Files;
using IApplicationServices;
using IRepositories;

namespace ApplicationService
{
    public class FIlePathService : IFilePathService
    {
        private readonly IFilePathRepository repository;

        public FIlePathService(IFilePathRepository repository)
        {
            this.repository = repository;
        }

        public async Task<FilePath> CreateAsync(FilePath file)
        {
            return await repository.CreateAsync(file);
        }

        public async Task<FilePath> FindAsync(Guid id)
        {
            return await repository.FindAsync(id);
        }
        public async Task<FilePath> CreateByPathAsync(string name, string path,string size)
        {
            var bo = new FilePath(name, path,size);
            return await repository.CreateAsync(bo);
        }
    }
}
